package com.yhc.bootdemo.controller;

import com.yhc.bootdemo.entity.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Map;

@Controller
public class MyController {
//    无数据库，传数据到前端
    @RequestMapping("/")
    public  String go(Map map){
        map.put("msg","一分春色!");
        User user = new User(1001,"大江","男");
        map.put("user",user);
        return "index";
    }
}
